package com.ruoyi.businessSku.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.businessSku.mapper.BusinessSkuMapper;
import com.ruoyi.businessSku.domain.BusinessSku;
import com.ruoyi.businessSku.service.IBusinessSkuService;

/**
 * 业务商品管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-20
 */
@Service
public class BusinessSkuServiceImpl implements IBusinessSkuService 
{
    @Autowired
    private BusinessSkuMapper businessSkuMapper;

    /**
     * 查询业务商品管理
     * 
     * @param skuId 业务商品管理主键
     * @return 业务商品管理
     */
    @Override
    public BusinessSku selectBusinessSkuBySkuId(Long skuId)
    {
        return businessSkuMapper.selectBusinessSkuBySkuId(skuId);
    }

    /**
     * 查询业务商品管理列表
     * 
     * @param businessSku 业务商品管理
     * @return 业务商品管理
     */
    @Override
    public List<BusinessSku> selectBusinessSkuList(BusinessSku businessSku)
    {
        return businessSkuMapper.selectBusinessSkuList(businessSku);
    }

    /**
     * 新增业务商品管理
     * 
     * @param businessSku 业务商品管理
     * @return 结果
     */
    @Override
    public int insertBusinessSku(BusinessSku businessSku)
    {
        businessSku.setCreateTime(DateUtils.getNowDate());
        return businessSkuMapper.insertBusinessSku(businessSku);
    }

    /**
     * 修改业务商品管理
     * 
     * @param businessSku 业务商品管理
     * @return 结果
     */
    @Override
    public int updateBusinessSku(BusinessSku businessSku)
    {
        businessSku.setUpdateTime(DateUtils.getNowDate());
        return businessSkuMapper.updateBusinessSku(businessSku);
    }

    /**
     * 批量删除业务商品管理
     * 
     * @param skuIds 需要删除的业务商品管理主键
     * @return 结果
     */
    @Override
    public int deleteBusinessSkuBySkuIds(Long[] skuIds)
    {
        return businessSkuMapper.deleteBusinessSkuBySkuIds(skuIds);
    }

    /**
     * 删除业务商品管理信息
     * 
     * @param skuId 业务商品管理主键
     * @return 结果
     */
    @Override
    public int deleteBusinessSkuBySkuId(Long skuId)
    {
        return businessSkuMapper.deleteBusinessSkuBySkuId(skuId);
    }
}
